<template>
  <el-form :model="tempForm" :rules="tempRules" ref="tempForm" label-width="130px"  style="width: 500px">
    <el-form-item label="默认快递模板" prop="temp_ids">
      <el-input v-model="tempForm.temp_ids"></el-input>
    </el-form-item>
    <el-form-item label="">
      <el-button type="primary" @click="submitForm">保存设置</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
  import * as API_SystemSetting from '@/api/systemSetting'

  export default {
    name: 'systemSettingsSite',
    data() {
      return {
        tempForm: {},
        tempRules: {
          temp_ids: [this.MixinRequired('默认模板id,使用 , 隔开')]
        }
      }
    },
    methods: {
      submitForm() {
        this.$refs['tempForm'].validate((valid) => {
          if (valid) {
            const params = this.MixinClone(this.tempForm)
            API_SystemSetting.editTempSetting(params).then(() => {
              this.$message.success('设置成功！')
            })
          } else {
            this.$message.error('表单填写有误，请检查！')
            return false
          }
        })
      }
    }
  }
</script>

<style type="text/scss" lang="scss" scoped>
  .container {
    background-color: #fff;
    padding: 10px;
    position: relative;
  }
  .site-tag {
    margin: 0 3px;
  }
  .site-new-tag-input {
    width: 100px;
  }
  /deep/ .site-logo .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    &:hover {
      border-color: #409EFF;
    }
  }
  .logo-uploader-icon {
    font-size: 20px;
    color: #8c939d;
    width: 120px;
    height: 120px;
    line-height: 120px;
    text-align: center;
  }
  .site-logo-img {
    width: 120px;
    height: 120px;
    display: block;
  }

  .image-pane .el-input-group {
    width: 200px;
  }
  .point-pane .el-input-group {
    width: 200px;
  }
</style>
